<template>
  <div class="mainChat">
    <div class="content">
      <h1>oh! no~</h1>
      <p>很抱歉，你的页面走丢了！</p>
      <p>请检查你输入的网址是否正确，或点击返回按钮！</p>
      <button @click="goBack">返回</button>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    goBack() {
      this.$router.go(-1); // 返回上一页
      // 或者跳转到首页
      // this.$router.push('/');
    }
  }
};
</script>

<style lang="scss" scoped>
.mainChat {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../../assets/img/404.gif');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  color: black; 
  text-align: center;
}

.content {
  max-width: 600px;
  padding: 20px;
  border-radius: 8px;
  margin-top: -240px; // 向上偏移
  margin-left: 590px; // 向右偏移
}

h1 {
  font-size: 2em;
  margin-bottom: 10px;
}

p {
  font-size: 1.2em;
  margin-bottom: 20px;
}

button {
  padding: 10px 20px;
  font-size: 1em;
  color: #fff;
  background-color: #007bff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #0056b3;
}
</style>